<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<link rel="STYLESHEET" href="lib.css" type='text/css' />
<link rel="SHORTCUT ICON" href="../icons/pyfav.png" type="image/png" />
<link rel='start' href='../index.html' title='Python documentation Index' />
<link rel="first" href="lib.html" title='Python library Reference' />
<link rel='contents' href='contents.html' title="Contents" />
<link rel='index' href='genindex.html' title='Index' />
<link rel='last' href='about.html' title='About this document...' />
<link rel='help' href='about.html' title='About this document...' />
<link rel="prev" href="module-exceptions.html" />
<link rel="parent" href="builtin.html" />
<link rel="next" href="types.html" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name='aesop' content='information' />
<title>2.4 内置常量</title>
</head>
<body>
<div class="navigation">
<div id='top-navigation-panel' xml:id='top-navigation-panel'>
<table align="center" width="100%" cellpadding="0" cellspacing="2">
<tr>
<td class='online-navigation'><a rel="prev" title="2.3 built-in Exceptions"
  href="module-exceptions.html"><img src='../icons/previous.png'
  border='0' height='32'  alt='Previous Page' width='32' /></a></td>
<td class='online-navigation'><a rel="parent" title="2. built-in Objects"
  href="builtin.html"><img src='../icons/up.png'
  border='0' height='32'  alt='Up one Level' width='32' /></a></td>
<td class='online-navigation'><a rel="next" title="3. built-in Types"
  href="types.html"><img src='../icons/next.png'
  border='0' height='32'  alt='Next Page' width='32' /></a></td>
<td align="center" width="100%">Python库参考</td>
<td class='online-navigation'><a rel="contents" title="Table of Contents"
  href="contents.html"><img src='../icons/contents.png'
  border='0' height='32'  alt='Contents' width='32' /></a></td>
<td class='online-navigation'><a href="modindex.html" title="Module Index"><img src='../icons/modules.png'
  border='0' height='32'  alt='Module Index' width='32' /></a></td>
<td class='online-navigation'><a rel="index" title="Index"
  href="genindex.html"><img src='../icons/index.png'
  border='0' height='32'  alt='Index' width='32' /></a></td>
</tr></table>
<div class='online-navigation'>
<b class="navlabel">前一节:</b>
<a class="sectref" rel="prev" href="module-exceptions.html">2.3 内置异常</a>
<b class="navlabel">上一级:</b>
<a class="sectref" rel="parent" href="builtin.html">2. 内置对象</a>
<b class="navlabel">下一节:</b>
<a class="sectref" rel="next" href="types.html">3. 内置类型</a>
</div>
<hr /></div>
</div>
<!--End of Navigation Panel-->

<h1><a name="SECTION004400000000000000000">
2.4 内置常量</a>
</h1>

<p>
少数常量存在在内置命名空间中。它们是：
<p>
<dl><dt><b><tt id='l2h-141' xml:id='l2h-141'>False</tt></b></dt>
<dd><tt class="class">bool</tt> 类型的 false 值。<span class="versionnote">2.3</span> 版本中的新特性。

</dd></dl>

<p>
<dl><dt><b><tt id='l2h-142' xml:id='l2h-142'>True</tt></b></dt>
<dd><tt class="class">bool</tt> 类型的 true 值。<span class="versionnote">2.3版本中的新特性。</span>

</dd></dl>

<p>
<dl><dt><b><tt id='l2h-143' xml:id='l2h-143'>None</tt></b></dt>
<dd>
  The sole value of <code><tt class="module"><a href="module-types.html">types</a></tt>.NoneType</code>.  <code>None</code> is
  frequently used to represent the absence of a value, as when default
  arguments are not passed to a function.
</dd></dl>

<p>
<dl><dt><b><tt id='l2h-144' xml:id='l2h-144'>NotImplemented</tt></b></dt>
<dd>
  Special value which can be returned by the ``rich comparison''
  special methods (<tt class="method">__eq__()</tt>, <tt class="method">__lt__()</tt>, and friends),
  to indicate that the comparison is not implemented with respect to
  the other type.
</dd></dl>

<p>
<dl><dt><b><tt id='l2h-145' xml:id='l2h-145'>Ellipsis</tt></b></dt>
<dd>
  Special value used in conjunction with extended slicing syntax.
  </dd></dl>

<p>

<div class="navigation">
<div class='online-navigation'>
<p></p><hr />
<table align="center" width="100%" cellpadding="0" cellspacing="2">
<tr>
<td class='online-navigation'><a rel="prev" title="2.3 built-in Exceptions"
  href="module-exceptions.html"><img src='../icons/previous.png'
  border='0' height='32'  alt='Previous Page' width='32' /></a></td>
<td class='online-navigation'><a rel="parent" title="2. built-in Objects"
  href="builtin.html"><img src='../icons/up.png'
  border='0' height='32'  alt='Up one Level' width='32' /></a></td>
<td class='online-navigation'><a rel="next" title="3. built-in Types"
  href="types.html"><img src='../icons/next.png'
  border='0' height='32'  alt='Next Page' width='32' /></a></td>
<td align="center" width="100%">Python库参考</td>
<td class='online-navigation'><a rel="contents" title="Table of Contents"
  href="contents.html"><img src='../icons/contents.png'
  border='0' height='32'  alt='Contents' width='32' /></a></td>
<td class='online-navigation'><a href="modindex.html" title="Module Index"><img src='../icons/modules.png'
  border='0' height='32'  alt='Module Index' width='32' /></a></td>
<td class='online-navigation'><a rel="index" title="Index"
  href="genindex.html"><img src='../icons/index.png'
  border='0' height='32'  alt='Index' width='32' /></a></td>
</tr></table>
<div class='online-navigation'><b class="navlabel">前一节:</b> <a class="sectref" rel="prev" href="module-exceptions.html">2.3 内置异常</a> <b class="navlabel">上一级:</b> <a class="sectref" rel="parent" href="builtin.html">2. 内置对象</a> <b class="navlabel">下一节:</b> <a class="sectref" rel="next" href="types.html">3. 内置类型</a></div>
</div>
<hr />
<span class="release-info">2.5.1 版，文档更新在 2007，4，18。翻译：zk<a href="http://www.zkfarmer.org">farmer</a>。</span></div>
<!--End of Navigation Panel-->
<address>
关于建议修改的信息查阅 <i><a href="about.html">关于这个文档... </a></i>。
</address>
</body>
</html>
